﻿package plugin.NewSkill
{
    import com.core.*;
    import manager.*;
    import plugin.NewSkill.control.*;

    public class SkillControl extends Control
    {

        public function SkillControl(param1:SkillUIControl)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            var _loc_3:SkillUIControl = null;
            if (param1.getName() == "skill")
            {
                _loc_3 = target as SkillUIControl;
                if (param2.property == "update")
                {
                    _loc_3.show();
                }
                else if (param2.property == "setskill")
                {
                    _loc_3.show();
                }
                else if (param2.property == "showkey")
                {
                    _loc_3.showKeyBoard(param2.newvalue.skillid, param2.newvalue.y);
                }
                else if (param2.property == "refresh")
                {
                    if (PluginManager.instance.getPluginState("skill") == "open")
                    {
                        _loc_3.reFreshSkill(param2.newvalue);
                    }
                }
                else if (param2.property == "refreshshulian")
                {
                    if (PluginManager.instance.getPluginState("skill") == "open")
                    {
                        _loc_3.reFreshSkillShuLian(param2.newvalue);
                    }
                }
                else if (param2.property == "selectskill")
                {
                    _loc_3.selectSkill(param2.newvalue.plus.index);
                }
                else if (param2.property == "showskillup")
                {
                    _loc_3.showEff();
                }
                else if (param2.property == "setcount")
                {
                    _loc_3.setCount();
                }
            }
            return;
        }// end function

    }
}
